package com.doit.day03;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@ToString
@NoArgsConstructor
@AllArgsConstructor
@Data
public class ChiGe implements Comparable<ChiGe>{
    private int id;
    private String name;
    private int age;
    private String gender;

    @Override
    public int compareTo(ChiGe o) {
        return o.getAge() - this.age ;
    }
}
